<?php
/**
 * Created by PhpStorm.
 * User: 于婧雯
 * Date: 2019/3/19
 * Time: 10:02
 */
namespace App\Http\Controllers\NewAdmin;

use App\Http\Controllers\AdapterWebController;
use Illuminate\Http\Request;
use App\Modules\UCenter\WayBill as ApiWayBill;

//后台运单管理
class WayBill extends AdapterWebController
{
    // 运单列表
    public function waybillList(Request $request)
    {
        if (empty($request['keywords'])) {
            $postData['keywords'] = '';
        } else {
            $postData['keywords'] = $request['keywords'];
        }
        $list = $this->appLayerExec(ApiWayBill::class, 'waybillList', $postData);
        return view('newAdmin.waybill.waybill_list', ['list' => $list['res']]);
    }

    // 运单信息
    public function waybillInfo($id)
    {
        $postData['id'] = $id;
        $info = $this->appLayerExec(ApiWayBill::class, 'waybillInfo', $postData);
        return view('newAdmin.waybill.waybill_info', ['info' => $info['res']]);
    }

}
